import { http } from "@/uni_modules/uview-plus";
import config from "../common/config";

// 订单列表
export const orderList = (params) => {
  return http.get("/api/delivery/order/public", {
    params,
  });
};

// 我的订单列表
export const myOrderList = (params) => {
  return http.get("/api/delivery/order/me", {
    params,
  });
};

// 接单
export const takeOrder = (data) => {
  return http.post("/api/delivery/order/accept", data);
};

// 取件
export const actionOrder = (data) => {
  return http.post("/api/delivery/order/action", data);
};

// 订单详情
export const orderDetail = (params) => {
  return http.get("/api/delivery/order/detail", {
    params,
  });
};
